package com.dreamlike.demo.HttpUtil.Core.Validator;

import com.dreamlike.demo.HttpUtil.Core.HttpDefinition;
import lombok.Getter;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Getter
public class HttpDefinitionValidateResult {
    private Map<HttpDefinitionValidator,String> errorInfo;
    public HttpDefinitionValidateResult(){
        errorInfo = new HashMap<>();
    }
    public boolean hasError(){
        return !errorInfo.isEmpty();
    }
    public void addInfo(String info,HttpDefinitionValidator h){
        errorInfo.put(h,info);
    }
    public void clear(){
        errorInfo.clear();
    }
}
